<div class="card-body">
  <%= render "_node_selector.html", assigns %>
  <%= form_for @changeset, @action, fn f -> %>
    <input name="utf8" type="hidden" value="&#x2713;" />
    <%= hidden_input f, :node_id %>
    <%= error_tag f, :node_id %>
    <div class="form-group">
      <div class="input-group">
        <div class="input-group-prepend">
          <button type="button" class="btn btn-default" id="node-selector-button" data-toggle="modal" data-target="#node-selector">
            <%= Map.get(assigns, :topic) && @topic.node.name || "选择节点..." %>
          </button>
        </div>
        <%= text_input f, :title, class: "form-control", required: true, placeholder: "Title" %>
        <%= error_tag f, :title %>
      </div>
    </div>
    <%= render "_editor_toolbar.html", assigns %>

    <div class="form-group">
      <%= textarea f, :body, class: "form-control topic-editor closewarning", required: true, placeholder: "Body", rows: 20 %>
      <%= error_tag f, :body %>
    </div>
    <div class="form-actions hide-ios">
      <%= submit gettext("Submit"), class: "btn btn-primary" %>
      <div class="pull-right hide-ios">
        <a href="/markdown" target="_blank"><i class="fa fa-tip"></i>
          <%= gettext "Markdown Guide" %>
        </a>
      </div>
    </div>
  <% end %>
</div>